<h3>Add Info to {{fullName}}</h3>
<br/>

<form id="createInfo" name="createInfo" class="form-horizontal" role="form" ng-controller="InfosController as infosCtrl"
      ng-submit="createInfo.$valid && infosCtrl.createInfo(currentUser, infoN.id, value) || infosCtrl.closeAll()"
      novalidate>
    	<div class="row">
<!--      	Select info:  <br> -->
<!--      	<div  class=col-sm-3> -->
<!--  			<select class="form-group" ng-model="infoNameId"> -->
<!-- 				<option ng-repeat="infoName in infoNames" value="{{infoName.id}}" ng-click="infosCtrl.setDecimalPattern(infoName.decimal)">{{infoName.name}}</option> -->
<!-- 	    	</select> -->
<!-- 		<br> -->
			<div class="btn-group col-md-4" dropdown is-open="status.isopen">
		      <button type="button" class="btn btn-primary dropdown-toggle" dropdown-toggle ng-model="infoNameId">
		        {{infoN.name}} <span class="caret"></span>
		      </button>
		      <ul class="dropdown-menu" role="menu">
		        <li ng-repeat="infoName in infoNames" ng-click="infosCtrl.setInfoName(infoName)">{{infoName.name}}</li>
		      </ul>
		    </div>
		    
			<div class="form-group col-md-8" ng-class="{'has-error': !createInfo.value.$valid && createInfo.value.$dirty}">
				<input class="form-control" name="value" type="text" maxlength="63" ng-model="value" ng-pattern="pat" required></input></br>
			</div>
		</div>
	    <div class="form-group">
		    <div class="col-md-10">
		        <input ng-disabled="!createInfo.$valid || !infoN.id" id="btn-login" type="submit" name="add" class="btn btn-success col-sm-8" value="Add info">
		    </div>
		</div> 
</form>
